package com.wmz.crm.workbench.mapper;

import com.wmz.crm.commons.entity.FunnelVO;
import com.wmz.crm.workbench.entity.Tran;

import java.util.List;
import java.util.Map;

public interface TranMapper {
    int deleteByPrimaryKey(String id);

    int insert(Tran row);

    int insertSelective(Tran row);

    Tran selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Tran row);

    int updateByPrimaryKey(Tran row);

    // 如果需要创建交易,还要往交易表中添加一条记录
    int insertTran(Tran tran);

    //根据分页条件来查询交易
    List<Tran> selectTranByConditionForPage(Map<String,Object> map);

    //根据分页条件查询线索总条数
    int selectCountOfTranByCondition(Map<String,Object> map);

    //根据id查询交易明细信息
    Tran selectTranForDetailById(String id);

    //查询各个阶段数据量
    List<FunnelVO> selectCountOfTranGroupByStage();

}
